package com.orm.handler;

import java.sql.JDBCType;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Object 就直接用原始的jdbc 就行
 */
public class ObjectTypeHandler extends BaseTypeHandler<Object> {
	@Override
	public void setNotNullParameter(PreparedStatement ps, int i, Object parameter, JDBCType jdbcType) throws SQLException {
		ps.setObject(i, parameter);
	}
	
	@Override
	public Object getNullableResult(ResultSet rs, String columnName) throws SQLException {
		return rs.getObject(columnName);
	}
	
	@Override
	public Object getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
		return rs.getObject(columnIndex);
	}
}
